import React, { useContext } from 'react'
import {ThemeContext} from './FnGrand'

function FnSon() {
    let context = useContext(ThemeContext);
    console.log('跨级传递的数据：', context);
    return (
        <div>
            <p>我是孙字辈的组件，我从爷爷那里直接获得数据，和父组件没关系</p>
        </div>
    )
}

export default FnSon